<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/taglibs.jsp" %>


<style type="text/css">
td.querytitle {background-color:#DBDBDB;text-align: right;font-weight: 600;padding-right: 10px;}
</style>
<script>
function showYearType(n){
	if(n == 4)
		$("#show_yearEqMode").show();
	else
		$("#show_yearEqMode").hide();
}

</script>


<form:form modelAttribute="QueryAAFForm" method="post">
	<div id="area">
		<table style="width:800px;border:1px solid #D2D9E7;">
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">查詢模式</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">	
					<form:radiobutton path="query_type" value="false" label="模糊查詢" />				
					<form:radiobutton path="query_type" value="true" label="精確查詢" />
				</td>
			</tr>
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">原文標題</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">
					<form:input path="title_o" cssClass="bar_1" cssStyle="width:90%;"/>
				</td>
			</tr>
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">作者</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">
					<form:input path="author" cssClass="bar_1" cssStyle="width:90%;"/>
				</td>
			</tr>
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">原文摘要</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">
					<form:input path="abstract_o" cssClass="bar_1" cssStyle="width:90%;"/>
				</td>
			</tr>
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">關鍵詞</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">
					<form:input path="keyword_o" cssClass="bar_1" cssStyle="width:90%;"/>
				</td>
			</tr>			
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">出版年</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">
				
					<form:select path="year_type" cssClass="bar_1" cssStyle="width:40px;" onchange="showYearType(this.value);">
						<form:option value="1" label="≧"/>
						<form:option value="2" label="≦"/>
						<form:option value="3" label="＝"/>
						<form:option value="4" label="～"/>
					</form:select>
					
					<form:select path="start_year" cssStyle="width:60px;" cssClass="bar_1">
						<form:option value="1" label="不明"/>			
						<c:forEach var="year" begin="1981" end="2012" varStatus="s">
							<form:option value="${year }" label="${year }"/>								
						</c:forEach>
					</form:select>
					<span id="show_yearEqMode" style="display:none">
						～
						<form:select path="end_year" cssStyle="width:60px;" cssClass="bar_1">
							<c:forEach var="year" begin="1981" end="2012" varStatus="s">
								<form:option value="${year }" label="${year }"/>								
							</c:forEach>
						</form:select>
					</span>
				</td>
			</tr>
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">語文</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">
					<table style="width:100%">
						<tr>
							<td style="width:30px;">
								<input type="checkbox" id="language_all" onclick="checkall('language')" checked="checked"/>
							</td>
							<td>			
								<c:forEach var="lans" items="${CodeLanguage}">
									<form:checkbox path="language" value="${lans.code }" label="${lans.name }" checked="checked"/><br/>
								</c:forEach>
							</td>
						</tr>
					</table>					
				</td>
			</tr>
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">資料類型</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">
					<table style="width:100%">
						<tr>
							<td style="width:30px;">
								<input type="checkbox" id="doc_type_all" onclick="checkall('doc_type')" checked="checked"/>
							</td>
							<td>			
								<form:checkbox path="doc_type" value="1" label="期刊論文" checked="checked"/><br/>
								<form:checkbox path="doc_type" value="2" label="圖書/圖書章節" checked="checked"/><br/>
								<form:checkbox path="doc_type" value="3" label="報告" checked="checked"/><br/>
								<form:checkbox path="doc_type" value="4" label="會議論文/會議論文集" checked="checked"/><br/>
								<form:checkbox path="doc_type" value="5" label="學位論文" checked="checked"/><br/>
								<form:checkbox path="doc_type" value="6" label="手冊/教材" checked="checked"/>		
							</td>
						</tr>
					</table>
				</td>
			</tr>
			
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">探討植物別</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">
					<span id="span_selectedCodePlants" style="color:green;font-weight: 300;"></span>
					<span style="color:blue;cursor: pointer;" onclick="getCodePlantQuery(null,true);" class="editField">
						選取植物別
						<span id="plantLoadingImg" style="display:none">
							<img src="${appPath }/resource/image/ajax-loader.gif" />
						</span>
					</span>
				</td>
			</tr>
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">探討國別</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">
					<span id="span_selectedCodeCountries" style="color:green;font-weight: 300;"></span>
					<span style="color:blue;cursor: pointer;" onclick="getCodeCountryQuery(null,true);" class="editField">
						選取國別
						<span id="countryLoadingImg" style="display:none">
							<img src="${appPath }/resource/image/ajax-loader.gif" />
						</span>
					</span>
				</td>
			</tr>
			<tr class="trContent">
				<td class="querytitle" style="width:120px;">主題分類</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">				
					<table style="width:100%">
						<tr>
							<td style="width:30px;">
								<input type="checkbox" id="clazz_all" onclick="checkall('clazz')" checked="checked"/>
							</td>
							<td>			
								<form:checkbox path="clazz" value="A" label="生物安全政策與法規" checked="checked"/><br/>
								<form:checkbox path="clazz" value="B" label="風險評估與風險管理" checked="checked"/><br/>
								<form:checkbox path="clazz" value="C" label="社經與貿易議題" checked="checked"/><br/>
								<form:checkbox path="clazz" value="D" label="公眾認知" checked="checked"/><br/>
								<form:checkbox path="clazz" value="E" label="其他" checked="checked"/><br/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			
			<%-- 
			<tr class="trContent">
				<td class="querytitle">中譯標題</td>
				<td style="text-align: left;letter-spacing: 4px;padding-left: 10px;">
					<input type="text" class="bar_1" style="width:90%;"/>
				</td>
			</tr>
			--%>
			
			<tr style="background-color: #F2F2F2;">
				<td colspan="2" >
					<div style="width:100%;text-align:center;padding-top:20px;padding-bottom:20px;">									
						<span class="button_1" style="width:60px;padding: 6px 10px 6px 10px;" onclick="_reset();">清　除</span>								
						<span class="button" style="width:60px;" onclick="_query();">查　詢</span>
						
					</div>
				</td>
			</tr>	
		</table>
	</div>
	
	<table style="width:800px;border:1px solid #D2D9E7;">
		<tr>
			<td colspan="2">
				<table style="width:100%;" id="expandDescTable">
					<tr>
						<td style="width:90%;height:30px;padding-left:10px;letter-spacing: 4px;" id="expandDescTd"></td>
						<td style="text-align: center;" id="slide_icon" >
							<img src="${appPath }/resource/image/1318497647_br_up.png" style="cursor: pointer;" onclick="expand(1,'slow');"/>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	
	<form:hidden path="plants_code" />
	<form:hidden path="plants_name_ch" />
	<form:hidden path="countries_code" />
	<form:hidden path="countries_name_ch" />
	<form:hidden path="rowsPerPage" />
	<form:hidden path="flow" />
</form:form> 
